package com.miya.demo.support.elasticsearch.document;

import cn.easyes.annotation.IndexField;
import cn.easyes.annotation.IndexId;
import cn.easyes.annotation.IndexName;
import cn.easyes.annotation.rely.Analyzer;
import cn.easyes.annotation.rely.FieldType;
import cn.easyes.annotation.rely.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 司机
 *
 * @author CaiXiaowei
 * @date 2022/12/6
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@IndexName(value = "driver")
public class Driver {

    /**
     * id
     */
    @IndexId(type = IdType.CUSTOMIZE)
    private String id;

    /**
     * 姓名
     */
    @IndexField(fieldType = FieldType.TEXT)
    private String name;

    /**
     * 性别
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String gender;

    /**
     * 驾龄
     */
    private Integer driverAge;

    /**
     * 车型
     */
    @IndexField(fieldType = FieldType.TEXT)
    private String carModel;

    /**
     * 位置经纬度,如: "40.13933715136454,116.63441990026217"
     */
    @IndexField(fieldType = FieldType.GEO_POINT)
    private String location;

    /**
     * 位置图形(例如圆心,矩形)
     */
    @IndexField(fieldType = FieldType.GEO_SHAPE)
    private String geoLocation;

}
